package hello.mapper;

import hello.BaseMapper;
import hello.aop.AuditData;
import hello.aop.AuditOperateType;
import hello.model.DataHis;
import hello.model.Staff;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created by caixx on 2016/3/21.
 */
public interface DataHisMapper extends BaseMapper {


    @Insert({"insert  into data_his(`operate` ,`table` ,`column` ,`old_data` ,`new_data` ,`tenant_id` ,`update_time` ,`update_by`,`biz_id`)",
            "values (   #{operate}, #{table}, #{column}, #{oldData}, #{newData},  ",
            "#{tenantId}, #{updateTime}, #{updateBy},#{bizId}) "
    })
    @SelectKey(before = false, keyProperty = "id", resultType = Long.class, statement = "SELECT LAST_INSERT_ID() AS id")
    public void addDataHis(DataHis dataHis);


}
